﻿/*========================== 
 * @author 郑金泉
 * @desc SQL 条件类
 * ========================= */
using System;
using System.Collections.Generic;
using System.Text;

namespace Obsidian.Data.Sql
{
    public class SqlCondition
    {

        /**s
         * 逻辑操作符
         */
        private LogicalOperator _logicalOperator = LogicalOperator.AND;

        /**
         * 设置逻辑操作符
         * @param logicalOperator
         */
        public LogicalOperator LogicalOperator
        {
            set { this._logicalOperator = value; }
            get { return this._logicalOperator; }
        }

        public string GetLogicalOperatorString()
        {
            switch (this._logicalOperator)
            {
                case Sql.LogicalOperator.AND:
                    return "AND";
                case Sql.LogicalOperator.OR:
                    return "OR";
                case Sql.LogicalOperator.NOT:
                    return "NOT";
                default:
                    return null;
            }
        }

    }

    public enum LogicalOperator
    {
        AND,
        OR,
        NOT
    }
}
